getApp();

var t = null, e = require("../../utils/util.js");

Page({
    data: {
        jokerId: null,
        jokerTs: null,
        buttonClicked: !1,
        showModal: !1,
        shiqu: !0
    },
    submit: function() {
        this.setData({
            showModal: !0
        });
    },
    saoma: function(t) {
        var e = t.currentTarget.dataset.jabiId;
        wx.navigateTo({
            url: "/pages/article/articleall/articleall?id=" + e
        });
    },
    preventTouchMove: function() {},
    close: function() {
        this.setData({
            showModal: !1
        });
    },
    sharetof: function() {
        wx.previewImage({
            urls: [ "https://i.loli.net/2020/08/07/pfKOqnuQhb3gDPZ.jpg" ]
        });
    },
    saveHB: function() {
        wx.downloadFile({
            url: "https://i.loli.net/2020/08/07/pfKOqnuQhb3gDPZ.jpg",
            success: function(t) {
                if (200 === t.statusCode) {
                    var e = t.tempFilePath;
                    wx.saveImageToPhotosAlbum({
                        filePath: e,
                        success: function(t) {
                            wx.showModal({
                                title: "保存成功",
                                content: "保存到相册成功！",
                                showCancel: !1,
                                confirmText: "好的"
                            });
                        },
                        fail: function(t) {
                            wx.showModal({
                                title: "保存失败",
                                content: "保存到相册失败，请重试！",
                                showCancel: !1,
                                confirmText: "好的"
                            });
                        }
                    });
                }
            }
        });
    },
    desdl: function(a) {
        e.buttonClicked(this), t && t.show().catch(function(e) {
            t.load().then(function() {
                return t.show();
            });
        });
        var n = a.currentTarget.dataset.jokerId;
        this.setData({
            jokerId: n
        }), console.log(n);
        var o = a.currentTarget.dataset.jokerTs;
        this.setData({
            jokerTs: o
        }), console.log(o);
    },
    down: function() {
        var t = this.data.jokerId, e = this.data.jokerTs;
        console.log(e), wx.setClipboardData({
            data: t,
            success: function(t) {
                wx.getClipboardData({
                    success: function(t) {
                        wx.showModal({
                            title: "温馨提示",
                            content: e,
                            showCancel: !1,
                            confirmText: "好的"
                        });
                    },
                    fail: function(t) {
                        wx.showModal({
                            title: "温馨提示",
                            content: "链接复制失败，请重试！",
                            showCancel: !1,
                            confirmText: "好的"
                        });
                    }
                });
            }
        });
    },
    onLoad: function(e) {
        var a = this;
        wx.request({
            url: "https://sm.qyyh.xyz/xcx/saoma.json?json",
            method: "get",
            header: {
                "content-type": "application/json"
            }
        }), wx.request({
            url: "https://sm.qyyh.xyz/xcx/saoma.json?json",
            method: "get",
            header: {
                "content-type": "application/json"
            },
            success: function(t) {
                console.log(t.data), a.setData({
                    jokerweb: t.data
                });
            }
        }), wx.createRewardedVideoAd && ((t = wx.createRewardedVideoAd({
            adUnitId: "adunit-2028a81a7f41aed3"
        })).onError(function(t) {
            a.down();
        }), t.onClose(function(t) {
            t && t.isEnded || void 0 === t ? a.down() : wx.showModal({
                title: "复制失败",
                content: "必须播放完广告才能获取链接哦\n因此有几率弹出激励性广告。",
                showCancel: !1,
                confirmText: "好的"
            });
        }));
    },
    onShow: function(t) {
        var e = this;
        wx.request({
            url: "https://sm.qyyh.xyz/xcx/gonggao.json",
            method: "get",
            header: {
                "content-type": "application/json"
            },
            success: function(t) {
                e.setData({
                    gonggao: t.data
                });
            }
        });
    },
    wm: function() {
        wx.navigateToMiniProgram({
            appId: "wxece3a9a4c82f58c9",
            path: "ele-recommend-price/pages/guest/index?inviterId=c342f0a&chInfo=ch_wechat_chsub_CopyLink&_ltracker_f=tjyj1_wx_kzhuanzhu",
            success: function(t) {}
        });
    },
    km: function() {
        wx.navigateToMiniProgram({
            appId: "wx37810bf28a8db228",
            path: "pages/index/index",
            success: function(t) {}
        });
    },
    jc: function() {
        wx.navigateTo({
            url: "/pages/article/articleall/articleall?id=https://mp.weixin.qq.com/s/iyAJyU4HjzNyUhlX-P80CQ"
        });
    },
    gzh: function() {
        wx.navigateTo({
            url: "/pages/article/articleall/articleall?id=https://mp.weixin.qq.com/s/1vwnKTs88IJkIe4ixqLWeA"
        });
    },
    fk: function() {
        wx.navigateTo({
            url: "/pages/article/articleall/articleall?id=https://mp.weixin.qq.com/s/cS4EPGD2XmKZM2eqmIhVSQ"
        });
    },
    onShareAppMessage: function() {
        return {
            title: "腾讯游戏扫码登录！快来体验吧！",
            path: "/pages/index/index",
            imageUrl: "https://sm.qyyh.xyz/xcx/smfx.png"
        };
    }
});